<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        早上好
    </div>
    <script>
        var div = document.querySelector('div')
        let change = () => {
            setTimeout(() => {
                div.innerText = "中午好"
            }, 2000);
            
        }
        change();
    </script>
</body>

</html>